package com.cmsz.cashier.mapper;


import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.cmsz.cashier.bean.CashierOrderInoBean;

@Mapper
public interface CashierOrderInfoBeanMapper {
	
	@Select("SELECT ACTIVITY_CODE,REQ_SYS,REQ_DATE,REQ_DATE_TIME,REQ_TRANS_ID,ORDER_NO,ID_TYPE,ID_VALUE,ORDER_MONEY,PAYMENT,GIFT,MER_ACTIVITY_ID,PAYMENT_TYPE,PAYMENT_LIMIT,PRODUCT_ID,PRODUCT_NAME,PRODUCT_DESC,PRODUCT_URL,NOTIFY_URL,RETURN_URL,CLIENT_IP,CLIENT_TYPE,USER_AGENT,CUSTOM_PARAM,WEIXIN_APPID,WEIXIN_OPENID,LAST_UPD_TIME from CASHIER_ORDER_INFO where ORDER_NO = #{orderNo} and REQ_TRANS_ID = #{reqTransId} and REQ_DATE = #{reqDate}")	
	List<CashierOrderInoBean> selectList(CashierOrderInoBean orderBean);
	
	@Insert("INSERT INTO CASHIER_ORDER_INFO (ACTIVITY_CODE,REQ_SYS,REQ_DATE,REQ_DATE_TIME,REQ_TRANS_ID,ORDER_NO,ID_TYPE,ID_VALUE,ORDER_MONEY,PAYMENT,GIFT,MER_ACTIVITY_ID,PAYMENT_TYPE,PAYMENT_LIMIT,PRODUCT_ID,PRODUCT_NAME,PRODUCT_DESC,PRODUCT_URL,NOTIFY_URL,RETURN_URL,CLIENT_IP,CLIENT_TYPE,USER_AGENT,CUSTOM_PARAM,WEIXIN_APPID,WEIXIN_OPENID,LAST_UPD_TIME) values(#{activityCode,jdbcType=VARCHAR}, #{reqSys,jdbcType=VARCHAR},#{reqDate,jdbcType=CHAR},#{reqDateTime,jdbcType=CHAR},#{reqTransId,jdbcType=VARCHAR},#{orderNo,jdbcType=VARCHAR},#{idType,jdbcType=CHAR},#{idValue,jdbcType=VARCHAR},#{orderMoney,jdbcType=NUMERIC},#{payment,jdbcType=NUMERIC},#{gift,jdbcType=NUMERIC},#{merActivityId,jdbcType=VARCHAR},#{paymentType,jdbcType=VARCHAR},#{paymentLimit,jdbcType=VARCHAR},#{productId,jdbcType=VARCHAR},#{productName,jdbcType=VARCHAR},#{productDesc,jdbcType=VARCHAR},#{productUrl,jdbcType=VARCHAR},#{notifyUrl,jdbcType=VARCHAR},#{returnUrl,jdbcType=VARCHAR},#{clientIp,jdbcType=VARCHAR},#{clientType,jdbcType=VARCHAR},#{userAgent,jdbcType=VARCHAR},#{customParam,jdbcType=VARCHAR},#{weixinAppId,jdbcType=VARCHAR},#{weixinOpenId,jdbcType=VARCHAR},to_char(systimestamp, 'yyyymmddhh24miss')")	
	int insert(CashierOrderInoBean cashierOrder);
	
	
}
